{ pkgs, lib, ... }: 

# 自动扫描当前目录下的所有.nix文件(除了default.nix)作为overlay
let
  overlayFiles = lib.filesystem.listFilesRecursive ./.;
  overlayFilesFiltered = builtins.filter (path: 
    (lib.hasSuffix ".nix" (toString path)) && 
    (baseNameOf (toString path) != "default.nix") &&
    (baseNameOf (toString path) != "README.md")
  ) overlayFiles;
in
  builtins.map import overlayFilesFiltered 